package com.yytek.nmp.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 升级记录对象 upgrade_history
 * 
 * @author yytek-iot
 * @date 2022-09-06
 */
@ApiModel("升级记录对象")
public class UpgradeHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("id")
    private Long id;

    /** 策略id */
    @Excel(name = "策略id")
    @ApiModelProperty("策略id")
    private Long strategyId;

    /** 用户id */
    @Excel(name = "用户id")
    @ApiModelProperty("用户id")
    private String userId;

    /** 项目id */
    @Excel(name = "项目id")
    @ApiModelProperty("项目id")
    private Long projectId;

    /** 项目名称 */
    @Excel(name = "项目名称")
    @ApiModelProperty("项目名称")
    private String projectName;

    /** 升级产品id */
    @Excel(name = "升级产品id")
    @ApiModelProperty("升级产品id")
    private Long productId;

    /** 产品名 */
    @Excel(name = "产品名")
    @ApiModelProperty("产品名")
    private String productName;

    /** 升级设备id */
    @Excel(name = "升级设备id")
    @ApiModelProperty("升级设备id")
    private String deviceId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    @ApiModelProperty("设备名称")
    private String deviceName;

    /** 执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("执行时间")
    private Date executeTime;

    /** 执行内容 */
    @Excel(name = "执行内容")
    @ApiModelProperty("执行内容")
    private String executeContent;

    /** 主系统任务ID(唯一标识，更新状态) */
    @Excel(name = "主系统任务ID(唯一标识，更新状态)")
    @ApiModelProperty("主系统任务ID(唯一标识，更新状态)")
    private String taskId;

    /** 执行状态(0:未执行,1:执行中,2:成功,3:失败,4:超时,5:操作冲突) */
    @Excel(name = "执行状态(0:未执行,1:执行中,2:成功,3:失败,4:超时,5:操作冲突)")
    @ApiModelProperty("执行状态(0:未执行,1:执行中,2:成功,3:失败,4:超时,5:操作冲突)")
    private Integer execStatus;

    /** 失败原因 */
    @Excel(name = "失败原因")
    @ApiModelProperty("失败原因")
    private String failureResult;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setStrategyId(Long strategyId) 
    {
        this.strategyId = strategyId;
    }

    public Long getStrategyId() 
    {
        return strategyId;
    }
    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }
    public void setProjectId(Long projectId) 
    {
        this.projectId = projectId;
    }

    public Long getProjectId() 
    {
        return projectId;
    }
    public void setProjectName(String projectName) 
    {
        this.projectName = projectName;
    }

    public String getProjectName() 
    {
        return projectName;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setDeviceId(String deviceId) 
    {
        this.deviceId = deviceId;
    }

    public String getDeviceId() 
    {
        return deviceId;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setExecuteTime(Date executeTime) 
    {
        this.executeTime = executeTime;
    }

    public Date getExecuteTime() 
    {
        return executeTime;
    }
    public void setExecuteContent(String executeContent) 
    {
        this.executeContent = executeContent;
    }

    public String getExecuteContent() 
    {
        return executeContent;
    }
    public void setTaskId(String taskId) 
    {
        this.taskId = taskId;
    }

    public String getTaskId() 
    {
        return taskId;
    }
    public void setExecStatus(Integer execStatus) 
    {
        this.execStatus = execStatus;
    }

    public Integer getExecStatus() 
    {
        return execStatus;
    }
    public void setFailureResult(String failureResult) 
    {
        this.failureResult = failureResult;
    }

    public String getFailureResult() 
    {
        return failureResult;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("strategyId", getStrategyId())
            .append("userId", getUserId())
            .append("projectId", getProjectId())
            .append("projectName", getProjectName())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("deviceId", getDeviceId())
            .append("deviceName", getDeviceName())
            .append("executeTime", getExecuteTime())
            .append("executeContent", getExecuteContent())
            .append("taskId", getTaskId())
            .append("execStatus", getExecStatus())
            .append("failureResult", getFailureResult())
            .toString();
    }
}
